#include "vtkMRMLEndoscopeImageDisplayNode3.h"
#include <vtkImageResample.h>

vtkStandardNewMacro(vtkMRMLEndoscopeImageDisplayNode3);
vtkCxxRevisionMacro(vtkMRMLEndoscopeImageDisplayNode3, "$Revision: 1.0 $");
vtkMRMLEndoscopeImageDisplayNode3::vtkMRMLEndoscopeImageDisplayNode3(void)
{
}

vtkMRMLEndoscopeImageDisplayNode3::~vtkMRMLEndoscopeImageDisplayNode3(void)
{
}

vtkMRMLNode* vtkMRMLEndoscopeImageDisplayNode3::CreateNodeInstance()
{
	vtkObject* ret = vtkObjectFactory::CreateInstance("vtkMRMLEndoscopeImageDisplayNode2");
	if(ret)
	{
		return (vtkMRMLEndoscopeImageDisplayNode3*)ret;
	}
	// If the factory was unable to create the object, then create it here.
	return new vtkMRMLEndoscopeImageDisplayNode3;

}
const char* vtkMRMLEndoscopeImageDisplayNode3::GetNodeTagName()
{
	return "ImageDisplayNode3";
}

void vtkMRMLEndoscopeImageDisplayNode3::BuildPipeline()
{
	vtkImageResample  * imageReSample = vtkImageResample ::New();
	
	imageReSample->SetInput (ImageData);
	imageReSample->SetAxisMagnificationFactor(0, 1);
	imageReSample->SetAxisMagnificationFactor(1, 1);
	imageReSample->SetOutputSpacing(0.1, 0.1, 0.1);
	SetOutImageData(imageReSample->GetOutput());
	imageReSample->Delete();
	IsBuildPipeline = 1;
}